package org.example.product.vo;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.example.core.valid.group.AddGroup;
import org.example.product.api.domain.SkuFullReduction;
import org.example.product.api.domain.SkuLadder;
import org.example.product.entity.SkuAttributeEntity;
import org.example.product.entity.SkuImagesEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@Data
public class SkuRestVo{
    /**
     * skuId
     */
    private Long skuId;
    /**
     * spu_id
     */
    private Long spuId;
    /**
     * 商品标题
     */
    @NotBlank(message = "商品标题不能为空", groups = AddGroup.class)
    private String skuTitle;
    /**
     * 商品副标题
     */
    private String subTitle;
    /**
     * 分类id
     */
    private Long categoryId;
    /**
     * 品牌id
     */
    private Long brandId;
    /**
     * sku默认图片
     */
    private String skuDefaultImg;
    /**
     * sku库存
     */
    private Integer stock;
    /**
     * sku库存锁定数
     */
    private Integer stockLocked;
    /**
     * 价格
     */
    @DecimalMin(value = "0", message = "价格必须的一个大于0的数", groups = AddGroup.class)
    private BigDecimal price;
    /**
     * 销量
     */
    private Long saleCount;
    /**
     * sku图集
     */
    @NotEmpty(message = "sku图集不能为空",groups = {AddGroup.class})
    private List<SkuImagesEntity> images;
    /**
     * 销售属性集合
     */
    @NotEmpty(message = "销售属性不能为空", groups = AddGroup.class)
    private List<SkuAttributeEntity> attribute;
    /**
     * 满减信息
     */
    private List<SkuFullReduction> fullReductions;
    /**
     * 折扣信息
     */
    private List<SkuLadder> ladders;
}
